<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://cdn.bootcdn.net/ajax/libs/lodash.js/4.17.21/lodash.js"></script>
</head>
<body>
    <span>当前计数：</span><span>0</span> <br>
    <hr>
    <button>点击+1</button>

    <script>
        let btn = document.querySelector('button');
        let span = document.querySelectorAll('span')[1];
        let count = 0;
        btn.onclick = _.throttle(function(){
            count ++;
            span.innerHTML = count;
            console.log(111);
        },2000)
        
        
    </script>
</body>
</html>